home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / C / Translat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-19  |  10.0 KB  |  307 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:C:Translat.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emith.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Constants
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODTranslation_h
  18. #define SOM_ODTranslation_h
  19.  
  20.  
  21. #include <som.h>
  22.  
  23. /*
  24.  * -- This emitter treats Method Tokens as Thunks by default
  25.  * -- Use the sc modifier "nothunks" to change this default
  26.  */
  27. #undef somresolve_
  28. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  29.  
  30. /*
  31.  * Define the class name as an object type
  32.  */
  33. #ifndef ODTranslation
  34. #define ODTranslation SOMObject
  35. #endif
  36. #include <ODObject.h>
  37.  
  38. /*
  39.  * Start of user-defined types:
  40.  */
  41. #ifndef ODExtension
  42.     #define ODExtension SOMObject
  43. #endif /* ODExtension */
  44. #ifndef ODTypeSet
  45.     #define ODTypeSet SOMObject
  46. #endif /* ODTypeSet */
  47. #ifndef ODStorageUnitView
  48.     #define ODStorageUnitView SOMObject
  49. #endif /* ODStorageUnitView */
  50.  
  51. /*
  52.  * End of user-defined types.
  53.  */
  54.  
  55. #define ODTranslation_MajorVersion 0
  56. #define ODTranslation_MinorVersion 0
  57.  
  58. /*
  59.  * External name shortening if required
  60.  */
  61. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  62. #define ODTranslationNewClass c
  63. #define ODTranslationClassData d
  64. #define ODTranslationCClassData x
  65. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  66. /*--------------Migration------------*/
  67. #define ODTranslation_classObj ODTranslationClassData.classObject
  68. #define _ODTranslation ODTranslation_classObj
  69.  
  70. /*
  71.  * Declare the class creation procedure
  72.  */
  73.  
  74. #if applec ^ PRAGMA_LIB_EXPORT
  75. #pragma lib_export on
  76. #endif
  77.  
  78. SOMEXTERN SOMClass * SOMLINK ODTranslationNewClass(integer4 somtmajorVersion,
  79.         integer4 somtminorVersion);
  80.  
  81. /*
  82.  * Declare the class data structure
  83.  */
  84. SOMEXTERN struct ODTranslationClassDataStructure {
  85.     SOMAny *classObject;
  86.     somMToken InitTranslation;
  87.     somMToken CanTranslate;
  88.     somMToken GetTranslationOf;
  89.     somMToken TranslateView;
  90.     somMToken Translate;
  91.     somMToken GetISOTypeFromPlatformType;
  92.     somMToken GetPlatformTypeFromISOType;
  93. }
  94. #ifdef SOM_NO_DATA_EXPORTS
  95.     * ODTranslationGetClassData ( void );
  96. #   undef ODTranslationClassData
  97. #   define ODTranslationClassData (*ODTranslationGetClassData())
  98. #else
  99.       ODTranslationClassData;
  100. #endif /* SOM_NO_DATA_EXPORTS */
  101.  
  102. #if applec ^ PRAGMA_LIB_EXPORT
  103. #pragma lib_export off
  104. #endif
  105.  
  106.  
  107. /*
  108.  * Declare the C specific class data structure
  109.  */
  110. SOMEXTERN struct ODTranslationCClassDataStructure {
  111.     somMethodTabs parentMtab;
  112.     somDToken instanceDataToken;
  113. } ODTranslationCClassData;
  114.  
  115. /*
  116.  * New and Renew macros for ODTranslation
  117.  */
  118. #define ODTranslationNew() \
  119.     ( ( ! (ODTranslationClassData.classObject) && \
  120.         (ODTranslationNewClass(ODTranslation_MajorVersion, ODTranslation_MinorVersion)) ), \
  121.       (_somNew(ODTranslationClassData.classObject)) )
  122. #define ODTranslationRenew(buf) \
  123.     ( _somRenew(ODTranslationClassData.classObject, buf) )
  124.  
  125. /*
  126.  * Override method: Purge
  127.  */
  128. #define ODTranslation_Purge(somSelf,ev,size) \
  129.     ODObject_Purge(somSelf,ev,size)
  130.  
  131. /*
  132.  * Override method: somInit
  133.  */
  134. #define ODTranslation_somInit(somSelf) \
  135.     SOMObject_somInit(somSelf)
  136.  
  137. /*
  138.  * Override method: somUninit
  139.  */
  140. #define ODTranslation_somUninit(somSelf) \
  141.     SOMObject_somUninit(somSelf)
  142.  
  143. /*
  144.  * New Method: InitTranslation
  145.  */
  146. typedef void   (SOMLINK *somTD_ODTranslation_InitTranslation)(ODTranslation *somSelf, Environment *ev);
  147. #define somMD_ODTranslation_InitTranslation "::ODTranslation::InitTranslation"
  148. #define ODTranslation_InitTranslation(somSelf,ev) \
  149.     (SOM_Resolve(somSelf, ODTranslation, InitTranslation) \
  150.     (somSelf,ev))
  151. #ifndef SOMGD_InitTranslation
  152.     #if (defined(_InitTranslation) || defined(__InitTranslation))
  153.         #undef _InitTranslation
  154.         #undef __InitTranslation
  155.         #define SOMGD_InitTranslation 1
  156.     #else
  157.         #define _InitTranslation ODTranslation_InitTranslation
  158.     #endif /* _InitTranslation */
  159. #endif /* SOMGD_InitTranslation */
  160.  
  161. /*
  162.  * New Method: CanTranslate
  163.  */
  164. typedef ODTranslateResult   (SOMLINK *somTD_ODTranslation_CanTranslate)(ODTranslation *somSelf, Environment *ev,
  165.         ODType fromType);
  166. #define somMD_ODTranslation_CanTranslate "::ODTranslation::CanTranslate"
  167. #define ODTranslation_CanTranslate(somSelf,ev,fromType) \
  168.     (SOM_Resolve(somSelf, ODTranslation, CanTranslate) \
  169.     (somSelf,ev,fromType))
  170. #ifndef SOMGD_CanTranslate
  171.     #if (defined(_CanTranslate) || defined(__CanTranslate))
  172.         #undef _CanTranslate
  173.         #undef __CanTranslate
  174.         #define SOMGD_CanTranslate 1
  175.     #else
  176.         #define _CanTranslate ODTranslation_CanTranslate
  177.     #endif /* _CanTranslate */
  178. #endif /* SOMGD_CanTranslate */
  179.  
  180. /*
  181.  * New Method: GetTranslationOf
  182.  */
  183. typedef ODTypeSet*   (SOMLINK *somTD_ODTranslation_GetTranslationOf)(ODTranslation *somSelf, Environment *ev,
  184.         ODType fromType);
  185. #define somMD_ODTranslation_GetTranslationOf "::ODTranslation::GetTranslationOf"
  186. #define ODTranslation_GetTranslationOf(somSelf,ev,fromType) \
  187.     (SOM_Resolve(somSelf, ODTranslation, GetTranslationOf) \
  188.     (somSelf,ev,fromType))
  189. #ifndef SOMGD_GetTranslationOf
  190.     #if (defined(_GetTranslationOf) || defined(__GetTranslationOf))
  191.         #undef _GetTranslationOf
  192.         #undef __GetTranslationOf
  193.         #define SOMGD_GetTranslationOf 1
  194.     #else
  195.         #define _GetTranslationOf ODTranslation_GetTranslationOf
  196.     #endif /* _GetTranslationOf */
  197. #endif /* SOMGD_GetTranslationOf */
  198.  
  199. /*
  200.  * New Method: TranslateView
  201.  */
  202. typedef ODTranslateResult   (SOMLINK *somTD_ODTranslation_TranslateView)(ODTranslation *somSelf, Environment *ev,
  203.         ODStorageUnitView* fromView,
  204.         ODStorageUnitView* toView);
  205. #define somMD_ODTranslation_TranslateView "::ODTranslation::TranslateView"
  206. #define ODTranslation_TranslateView(somSelf,ev,fromView,toView) \
  207.     (SOM_Resolve(somSelf, ODTranslation, TranslateView) \
  208.     (somSelf,ev,fromView,toView))
  209. #ifndef SOMGD_TranslateView
  210.     #if (defined(_TranslateView) || defined(__TranslateView))
  211.         #undef _TranslateView
  212.         #undef __TranslateView
  213.         #define SOMGD_TranslateView 1
  214.     #else
  215.         #define _TranslateView ODTranslation_TranslateView
  216.     #endif /* _TranslateView */
  217. #endif /* SOMGD_TranslateView */
  218.  
  219. /*
  220.  * New Method: Translate
  221.  */
  222. typedef ODTranslateResult   (SOMLINK *somTD_ODTranslation_Translate)(ODTranslation *somSelf, Environment *ev,
  223.         ODPtr fromData,
  224.         ODULong fromDataSize,
  225.         ODType fromType,
  226.         ODType toType,
  227.         ODPtr* toData,
  228.         ODULong* toDataSize);
  229. #define somMD_ODTranslation_Translate "::ODTranslation::Translate"
  230. #define ODTranslation_Translate(somSelf,ev,fromData,fromDataSize,fromType,toType,toData,toDataSize) \
  231.     (SOM_Resolve(somSelf, ODTranslation, Translate) \
  232.     (somSelf,ev,fromData,fromDataSize,fromType,toType,toData,toDataSize))
  233. #ifndef SOMGD_Translate
  234.     #if (defined(_Translate) || defined(__Translate))
  235.         #undef _Translate
  236.         #undef __Translate
  237.         #define SOMGD_Translate 1
  238.     #else
  239.         #define _Translate ODTranslation_Translate
  240.     #endif /* _Translate */
  241. #endif /* SOMGD_Translate */
  242.  
  243. /*
  244.  * New Method: GetISOTypeFromPlatformType
  245.  */
  246. typedef ODType   (SOMLINK *somTD_ODTranslation_GetISOTypeFromPlatformType)(ODTranslation *somSelf, Environment *ev,
  247.         ODPlatformType platformType,
  248.         ODPlatformTypeSpace typeSpace);
  249. #define somMD_ODTranslation_GetISOTypeFromPlatformType "::ODTranslation::GetISOTypeFromPlatformType"
  250. #define ODTranslation_GetISOTypeFromPlatformType(somSelf,ev,platformType,typeSpace) \
  251.     (SOM_Resolve(somSelf, ODTranslation, GetISOTypeFromPlatformType) \
  252.     (somSelf,ev,platformType,typeSpace))
  253. #ifndef SOMGD_GetISOTypeFromPlatformType
  254.     #if (defined(_GetISOTypeFromPlatformType) || defined(__GetISOTypeFromPlatformType))
  255.         #undef _GetISOTypeFromPlatformType
  256.         #undef __GetISOTypeFromPlatformType
  257.         #define SOMGD_GetISOTypeFromPlatformType 1
  258.     #else
  259.         #define _GetISOTypeFromPlatformType ODTranslation_GetISOTypeFromPlatformType
  260.     #endif /* _GetISOTypeFromPlatformType */
  261. #endif /* SOMGD_GetISOTypeFromPlatformType */
  262.  
  263. /*
  264.  * New Method: GetPlatformTypeFromISOType
  265.  */
  266. typedef ODPlatformType   (SOMLINK *somTD_ODTranslation_GetPlatformTypeFromISOType)(ODTranslation *somSelf, Environment *ev,
  267.         ODType type);
  268. #define somMD_ODTranslation_GetPlatformTypeFromISOType "::ODTranslation::GetPlatformTypeFromISOType"
  269. #define ODTranslation_GetPlatformTypeFromISOType(somSelf,ev,type) \
  270.     (SOM_Resolve(somSelf, ODTranslation, GetPlatformTypeFromISOType) \
  271.     (somSelf,ev,type))
  272. #ifndef SOMGD_GetPlatformTypeFromISOType
  273.     #if (defined(_GetPlatformTypeFromISOType) || defined(__GetPlatformTypeFromISOType))
  274.         #undef _GetPlatformTypeFromISOType
  275.         #undef __GetPlatformTypeFromISOType
  276.         #define SOMGD_GetPlatformTypeFromISOType 1
  277.     #else
  278.         #define _GetPlatformTypeFromISOType ODTranslation_GetPlatformTypeFromISOType
  279.     #endif /* _GetPlatformTypeFromISOType */
  280. #endif /* SOMGD_GetPlatformTypeFromISOType */
  281. #ifndef SOM_DONT_USE_INHERITED_MACROS
  282. #define ODTranslation_InitObject ODObject_InitObject
  283. #define ODTranslation_IsInitialized ODObject_IsInitialized
  284. #define ODTranslation_HasExtension ODObject_HasExtension
  285. #define ODTranslation_GetExtension ODObject_GetExtension
  286. #define ODTranslation_ReleaseExtension ODObject_ReleaseExtension
  287. #define ODTranslation_SubClassResponsibility ODObject_SubClassResponsibility
  288. #define ODTranslation_somFree SOMObject_somFree
  289. #define ODTranslation_somGetClass SOMObject_somGetClass
  290. #define ODTranslation_somGetClassName SOMObject_somGetClassName
  291. #define ODTranslation_somGetSize SOMObject_somGetSize
  292. #define ODTranslation_somIsA SOMObject_somIsA
  293. #define ODTranslation_somIsInstanceOf SOMObject_somIsInstanceOf
  294. #define ODTranslation_somRespondsTo SOMObject_somRespondsTo
  295. #define ODTranslation_somDispatchV SOMObject_somDispatchV
  296. #define ODTranslation_somDispatchL SOMObject_somDispatchL
  297. #define ODTranslation_somDispatchA SOMObject_somDispatchA
  298. #define ODTranslation_somDispatchD SOMObject_somDispatchD
  299. #define ODTranslation_somDispatch SOMObject_somDispatch
  300. #define ODTranslation_somClassDispatch SOMObject_somClassDispatch
  301. #define ODTranslation_somPrintSelf SOMObject_somPrintSelf
  302. #define ODTranslation_somDumpSelf SOMObject_somDumpSelf
  303. #define ODTranslation_somDumpSelfInt SOMObject_somDumpSelfInt
  304. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  305.  
  306. #endif       /* SOM_ODTranslation_h */
  307.